import requests, pprint

session = requests.session()
login_url = 'http://localhost/api/mgr/signin'
payload = {
    'username': 'hff',
    'password': '88888888'
}
session.post(login_url, data=payload)
url = 'http://localhost/api/mgr/medicines'

params = {
    "action":"list_medicine",
    "pagenum": 2,
    "pagesize": 1
}

res = session.get(url, params=params)
pprint.pprint(res.json(), sort_dicts=0)